﻿<Button Type="primary" OnClick="@(()=>{ _visible = true; })">
    Open Modal
</Button>
<Modal Title="@title"
       Visible="@_visible"
       OnOk="@HandleOk"
       OnCancel="@HandleCancel">
    <p>Some contents...</p>
    <p>Some contents...</p>
    <p>Some contents...</p>
</Modal>
@code{
    string title = "BasicModal";
    bool _visible = false;

    private void HandleOk(MouseEventArgs e)
    {
        Console.WriteLine(e);
        _visible = false;
    }

    private void HandleCancel(MouseEventArgs e)
    {
        Console.WriteLine(e);
        _visible = false;
    }
}